# coffee main
require([
  'dojo/date/locale'
  'dijit/Dialog'
  'dojo/json'
  'dojo/_base/config'
  'dojo/_base/window'
  'dojo/i18n'
  'ready'
  'require'

], (locale, Dialog, JSON, config, win, i18n, ready, require)->
#  Explicitly parse the page
  now = new Date()
  dialog = new Dialog(
    id: "dialog",
    title: "Today: "+ locale.format(now, {formatLength:'full', selector: 'date'}) + ", Welcome back " + config.app.userName
  ).placeAt(win.body())
  dialog.startup()
  dialog.set("content", "<pre>#{JSON.stringify(config, null, '  ')}</pre>")
#  dialog.show()

  require(["dojo/parser", "demo/SomeWidget", "dijit/form/Button"], (parser)->parser.parse())
)